<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .span-common{
            font-size: 22px;
            font-weight: bold;
        }

        .span-red{
            color: red;
        }

        .span-green{
            color: green;
        }
    </style>
</head>
<body>
<script src="https://unpkg.com/vue@next"></script>
<div id="app">
    <span class="span-common" :class="{'span-red':isRed, 'span-green': isGreen}">Test Class</span>
</div>

<script>
    const vueOpt = {
        data(){
            return {
                isRed: false,
                isGreen: true
            }
        }
    }

    Vue.createApp(vueOpt).mount('#app');
</script>
</body>
</html>
